var option = {
    tooltip: {
        trigger: 'item',
        formatter: '{a} <br/>{b}: {c} ({d}%)'
    },
    legend: {
        icon:'circle',
      x:'center',
      top:5,
      itemHeight:8,
        data: ['作业类', '管理类', '指挥类','装置类','文明卫生类']
    },
    series: [
        {
            name: '违章管理',
            type: 'pie',
            selectedMode: 'single',
            radius: ['45%', '70%'],
            center:['50%','55%'],
            label: {        //展示文本设置 
                normal: {
                     show: true,     //展示
                     position: 'outside'      // outside表示文本显示位置为外部
                },
                emphasis: {    //文本样式
                    show: true,    //展示
                    textStyle: {    //文本样式
                        fontSize: '14',
                        fontWeight: '600',
                    }
                 }
           },
           labelLine: {    //引导线设置
                 normal: {
                      show: true,   //引导线显示
                      length:2
                 }
           },
            data: [
                {value: 335, name: '作业类',itemStyle:{color:'#ff9c00'}},
                {value: 234, name: '管理类',itemStyle:{color:'#5181ff'}},
                {value: 234, name: '指挥类',itemStyle:{color:'#958bff'}},
                {value: 234, name: '装置类',itemStyle:{color:'#fed100'}},
                {value: 234, name: '文明卫生类',itemStyle:{color:'#ff688d'}}
            ]
        },
    ]
};
function count(option){
    var Chart5 = echarts.init( document.getElementById('dianli_echart3'));
    Chart5.setOption(option,true);
}
count(option)
